import re
url='http://blog.jobbole.com/tag/linux/'
print(re.compile('/tag/').search(url))

url='http://blog.jobbole.com/category/it-tech/'
print(re.compile('/tag/').search(url))